﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TvTipper.Api;
using TvTipper.Entities;

namespace TvTipper.Testing
{
    public partial class TestDataPortal
    {
        IEnumerable<Person> Persons
        {
            get 
            {     
                yield return new Person()
                {
                    Id = "1",
                    Name = "Dani Danksi",
                    //BirthPlace = "Tel Aviv, Israel",
                    //BirthDate = "10 April, 1944",
                    Info = "This is some random info...",
                    OverRank = 3,
                    UserRank = 1,
                    Awards = 3,
                    ImageUrl = "http://ia.media-imdb.com/images/M/MV5BMjA0MjMzMTE5OF5BMl5BanBnXkFtZTcwMzQ2ODE3Mw@@._V1._SY314_CR26,0,214,314_.jpg"
                };

                yield return new Person()
                {
                    Id = "2",
                    Name = "Roman Goldstain",
                    ImageUrl = "http://urbantitan.com/wp-content/uploads/2010/04/Bugs-Bunny.jpg",
                    //BirthPlace = "Tel Aviv, Israel",
                    //BirthDate = "9 April, 1983",
                    Info = "This is some random info...",
                    UserRank = 5,
                    Awards = 0,
                    OverRank = 3,
                 };
      
                yield return new Person()
                {
                    Id = "3",
                    Name = "Johhny Depp",
                    //BirthPlace = "Owensboro, Kentucky, USA",
                    //BirthDate = "June 9, 1963",
                    Info = "Born John Christopher Depp in Owensboro, Kentucky, on June 9, 1963, Johnny Depp was raised in Florida. He dropped out of school at age 15 in the hopes of becoming a rock musician. He fronted a series of garage bands including The Kids, which once opened for",
                    UserRank = 4,
                    Awards = 15,
                    OverRank = 5,
                    ImageUrl = "http://ia.media-imdb.com/images/M/MV5BMTM0ODU5Nzk2OV5BMl5BanBnXkFtZTcwMzI2ODgyNQ@@._V1._SY314_CR3,0,214,314_.jpg"
                };

                yield return new Person()
                {
                    Id = "4",
                    Name = "Charlie Sheen",
                    //BirthPlace = "New York City, New York, USA",
                    //BirthDate = "September 3, 1965",
                    Info = "harlie Sheen was born Carlos Irwin Estévez on September 3, 1965, in New York City. His father, Martin Sheen, at the time was an actor just breaking into the business with performances on Broadway. His mother, Janet Sheen, was a former New York art student who had met Charlie's father right after he",
                    UserRank = 4,
                    Awards = 1,
                    OverRank = 5,
                    ImageUrl = "http://ia.media-imdb.com/images/M/MV5BMTIyNDQ5Nzk2OF5BMl5BanBnXkFtZTcwODU4MTU5MQ@@._V1._SX214_CR0,0,214,314_.jpg"
                };
 

                yield return new Person()
                {
                    Id = "5",
                    Name = "Denzel Washington",
                    //BirthPlace = "Mount Vernon, New York, USA",
                    //BirthDate = "December 28, 19545",
                    Info = "Denzel Washington was born in December 28,1954 in Mount Vernon, New York. He was the middle child of the 3 children of a Pentecostal minister father and a beautician mother. After graduating from high school, Denzel enrolled at Fordham University intent on a career in journalism. However, he caught the acting bug while appearing in student drama productions and, upon graduation, he moved to San Francisco and enrolled at the American Conservatory Theater. He left A.C.T. after only one year to seek work as an actor. With his acting versatility and powerful sexual p",
                    UserRank = 2,
                    OverRank = 3,
                    Awards = 1023,
                    ImageUrl = "http://ia.media-imdb.com/images/M/MV5BMTY3Njc3NTkwNF5BMl5BanBnXkFtZTcwMzg0MDM1OA@@._V1._SY314_CR21,0,214,314_.jpg"
                };
            }
        }

        IEnumerable<TvProgram> Programs
        {
            get
            {
                yield return new TvProgram()
                {
                    Id = "1",
                    Name = "Lost",
                    StartYear = 2004,
                    EndYear = 2008,
                    Description = "The survivors of a plane crash are forced to live with each other on a remote island, a dangerous new world that poses unique threats of its own.",
                    ImageUrl = "http://ia.media-imdb.com/images/M/MV5BMjA3NzMyMzU1MV5BMl5BanBnXkFtZTcwNjc1ODUwMg@@._V1._SY317_CR17,0,214,317_.jpg",
                    OverRank = 5,
                    UserRank = 4,
                    Generes = new List<int>() {101, 103}
                };

                yield return new TvProgram()
                {
                    Id = "2",
                    Name = "The Sopranos",
                    StartYear = 2003,
                    EndYear = 2003,
                    Description = "Modern day morality tale about New Jersey mob boss Tony Soprano, as he deals with personal and professional issues in his home and business life.",
                    ImageUrl = "http://ia.media-imdb.com/images/M/MV5BMTIxMjc4NTA2Nl5BMl5BanBnXkFtZTYwNTU2MzU5._V1._SY317_.jpg",
                    OverRank = 5,
                    UserRank = 5,
                    Generes = new List<int>() {101, 102}
                };

                yield return new TvProgram()
                {
                    Id = "3",
                    Name = "The Wire",
                    StartYear = 1996,
                    Description = "Baltimore drug scene, seen through the eyes of drug dealers, and law enforcement.",
                    ImageUrl = "http://ia.media-imdb.com/images/M/MV5BNjc1NzYwODEyMV5BMl5BanBnXkFtZTcwNTcxMzU1MQ@@._V1._SY317_CR9,0,214,317_.jpg",
                    OverRank = 5,
                    UserRank = 4,
                    Generes = new List<int>() {102, 105}
                };


                yield return new TvProgram()
                {
                    Id = "4",
                    Name = "How I Met Your Mother",
                    StartYear = 2005,
                    EndYear = 2011,
                    Description = "Ted searches for the woman of his dreams in New York City with the help of his four best friends.",
                    ImageUrl = "http://ia.media-imdb.com/images/M/MV5BNjg1MDQ5MjQ2N15BMl5BanBnXkFtZTYwNjI5NjA3._V1._SY317_CR11,0,214,317_.jpg",
                    OverRank = 3,
                    UserRank = 3
                };

                yield return new TvProgram()
                {
                    Id = "5",
                    Name = "The Big Bang Theory",
                    StartYear = 1900,
                    Description = "A woman who moves into an apartment next door to two brilliant but socially awkward physicists shows them how little they know about life outside of the laboratory.",
                    ImageUrl = "http://ia.media-imdb.com/images/M/MV5BMjQzMTYyODM4M15BMl5BanBnXkFtZTcwMTAxMDU1MQ@@._V1._SY317_CR10,0,214,317_.jpg",
                    OverRank = 4,
                    UserRank = 2,
                    Generes = new List<int>() { 105 }

                };
            }
        }

        public IEnumerable<IDictionary<string, IList<TvProgramMetadata>>> RolesToPrograms
        {
            get
            {
                var rtp = new Dictionary<string, IList<TvProgramMetadata>>();
                rtp["201"] = Programs.Where(p => (p.Id.Equals("1")) || (p.Id.Equals("5"))).
                    Select(p => p.GetMetadata()).
                    ToList();
                rtp["202"] = Programs.Where(p => p.Id.Equals("2")).
                    Select(p => p.GetMetadata()).
                     ToList();

                yield return rtp;

                rtp = new Dictionary<string, IList<TvProgramMetadata>>();
                rtp["201"] = Programs.Where(p => (p.Id.Equals("2")) || (p.Id.Equals("3"))).
                    Select(p => p.GetMetadata()).
                    ToList();
                rtp["205"] = Programs.Where(p => p.Id.Equals("1")).
                    Select(p => p.GetMetadata()).
                     ToList();
                rtp["203"] = Programs.Where(p => p.Id.Equals("1")).
                     Select(p => p.GetMetadata()).
                     ToList();
                yield return rtp;


                rtp = new Dictionary<string, IList<TvProgramMetadata>>();
                rtp["201"] = Programs.Where(p => p.Id.Equals("5")).
                    Select(p => p.GetMetadata()).
                    ToList();
                rtp["205"] = Programs.Where(p => p.Id.Equals("3")).
                    Select(p => p.GetMetadata()).
                     ToList();

                yield return rtp;

                rtp = new Dictionary<string, IList<TvProgramMetadata>>();
                rtp["206"] = Programs.Where(p => (p.Id.Equals("2")) || (p.Id.Equals("3"))).
                    Select(p => p.GetMetadata()).
                    ToList();

                yield return rtp;
            }
        }

        public IEnumerable<LookupEntity> Generes
        {
            get
            {
                yield return new LookupEntity() { Id = 101, Name = "Adventure" };
                yield return new LookupEntity() { Id = 102, Name = "Animation" };
                yield return new LookupEntity() { Id = 103, Name = "Science Fiction" };
                yield return new LookupEntity() { Id = 104, Name = "Action" };
                yield return new LookupEntity() { Id = 105, Name = "Drama" };

            }
        }

        public IEnumerable<LookupEntity> Roles
        {
            get
            {
                yield return new LookupEntity() { Id = 201, Name = "Actor" };
                yield return new LookupEntity() { Id = 202, Name = "Creator" };
                yield return new LookupEntity() { Id = 203, Name = "Producer" };
                yield return new LookupEntity() { Id = 204, Name = "Hair Stylist" };
                yield return new LookupEntity() { Id = 205, Name = "Director" };
                yield return new LookupEntity() { Id = 206, Name = "Dog Walker" };

     
            }
        }
    }
}
